第18 步:要正确猜测还有更多工作要做,但让我们注意猜测错误时会发生什么!

  • 从逻辑和, 将Else拖入for循环。确保它只缩进一次!
  • 从, 在 else-block 中添加Append 。将letter_guess wrong_guesses 。
  • 从,在 else-block 中添加Update Display 。
  • 将wrong_display my_display my_var更改为wrong_guesses 。点击运行并猜错!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)